package com.ant.collect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author hzd
 * @since 2025-11-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_menu")
@ApiModel(value="Menu对象", description="")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "菜单名称")
    private String name;

    @ApiModelProperty(value = "菜单父类id")
    @TableField("parent_id")
    private Integer parentId;

    @ApiModelProperty(value = "路由path")
    private String path;

    @ApiModelProperty(value = "组件路径")
    private String component;

    @ApiModelProperty(value = "0：目录；1：菜单；2：按钮")
    private Integer type;

    @ApiModelProperty(value = "按钮操作权限")
    private String button;

    @ApiModelProperty(value = "菜单标题属性")
    private String title;

    @ApiModelProperty(value = "菜单是否显示标志")
    private String hidden;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    @ApiModelProperty(value = "菜单序号")
    private Integer sort;

    @ApiModelProperty(value = "状态：0：不可用；1：可用")
    private Integer status;

    @ApiModelProperty(value = "状态：0：不可用；1：可用")
    private Integer level;

    @TableField(exist = false)
    private List<Menu> children; // 子菜单列表（用于构建树形结构）
}
